package com.ruoyi.yuwen.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yuwen.mapper.CommissionMapper;
import com.ruoyi.yuwen.domain.Commission;
import com.ruoyi.yuwen.service.ICommissionService;

/**
 * 佣金Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-27
 */
@Service
public class CommissionServiceImpl implements ICommissionService 
{
    @Autowired
    private CommissionMapper commissionMapper;

    /**
     * 查询佣金
     * 
     * @param id 佣金主键
     * @return 佣金
     */
    @Override
    public Commission selectCommissionById(Long id)
    {
        return commissionMapper.selectCommissionById(id);
    }

    /**
     * 查询佣金列表
     * 
     * @param commission 佣金
     * @return 佣金
     */
    @Override
    public List<Commission> selectCommissionList(Commission commission)
    {
        return commissionMapper.selectCommissionList(commission);
    }

    /**
     * 新增佣金
     * 
     * @param commission 佣金
     * @return 结果
     */
    @Override
    public int insertCommission(Commission commission)
    {
        return commissionMapper.insertCommission(commission);
    }

    /**
     * 修改佣金
     * 
     * @param commission 佣金
     * @return 结果
     */
    @Override
    public int updateCommission(Commission commission)
    {
        return commissionMapper.updateCommission(commission);
    }

    /**
     * 批量删除佣金
     * 
     * @param ids 需要删除的佣金主键
     * @return 结果
     */
    @Override
    public int deleteCommissionByIds(Long[] ids)
    {
        return commissionMapper.deleteCommissionByIds(ids);
    }

    /**
     * 删除佣金信息
     * 
     * @param id 佣金主键
     * @return 结果
     */
    @Override
    public int deleteCommissionById(Long id)
    {
        return commissionMapper.deleteCommissionById(id);
    }
}
